#include "LocalPara.h"
#include "ui_LocalPara.h"

LocalPara::LocalPara(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::LocalPara)
{
    ui->setupUi(this);
    this->setWindowTitle("本地配置文件调整");
    initUIs();
    ui->cusHor->setStyleSheet("  \
                 QSlider::add-page:Horizontal\
                 {     \
                    background-color: rgb(87, 97, 106);\
                    height:4px;\
                 }\
                 QSlider::sub-page:Horizontal \
                {\
                    background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(231,80,229, 255), stop:1 rgba(7,208,255, 255));\
                    height:4px;\
                 }\
                QSlider::groove:Horizontal \
                {\
                    background:transparent;\
                    height:6px;\
                }\
                QSlider::handle:Horizontal \
                {\
                    height: 30px;\
                    width:8px;\
                    border-image: url(:/icons/camera.png);\
                    margin: -8 0px; \
                }\
                ");

}

LocalPara::~LocalPara()
{
    delete ui;
}


void LocalPara::initUIs()
{
    ui->treeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
    ui->treeWidget->setSelectionMode(QAbstractItemView::SingleSelection);

    ui->treeWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
    ui->treeWidget->setHeaderHidden(true);
    ui->treeWidget->header()->setStretchLastSection(true);
    ui->treeWidget->topLevelItem(0)->setSelected(true);
    ui->treeWidget->setFocusPolicy(Qt::NoFocus);
}
